1. Field of the Invention
The invention relates to computer systems, and more particularly to power management for computer systems.
2. Description of the Related Art
A computer system, such as a handheld device or a notebook, operates according to power supplied by batteries. Because a battery has a limited amount of power, a computer system cannot operate when the power of the battery is exhausted. The computer system therefore must know a power level of the battery. When the power level of the battery is lower than a threshold value, the computer system must remind a user of the reduced power level, thus directing the user to replace the battery with a new one.
Referring to FIG. 1, a block diagram of a conventional computer system 100 is shown. The computer system 100 comprises a system controller 102, such as CPU, a south bridge chipset 104, an embedded controller 106, a system management bus 110, a battery 108, and other device 112. The system controller 102 is a core of the computer system 100 and controls other component devices of the computer system 100. The embedded controller 106 is connected to the battery 108 and the other device 112 via the system management bus 110. The embedded controller 106 controls all devices connected to the system management bus 110 and reports a status of all devices connected to the system management bus 110 to the south bridge chipset 104. In one embodiment, the other device 112 is a fan or a keyboard.
When a power level of the battery 108 is reduced, the embedded controller 106 must reports reduction of the power level of the battery 108 to the system controller 102 via the south bridge chipset 104. Referring to FIG. 2, a flowchart of a method 200 for power management for the conventional computer system 100 is shown. The embedded controller 106 first detects whether a power level supplied by the battery 108 has decreased (step 202). If so, the embedded controller 106 triggers the south bridge chipset 104 to send a system control interrupt to the system controller 102 (step 204). In one embodiment, the embedded controller 106 enables a status bit of a general purpose register of the south bridge chipset 104, thus triggering the south bridge chipset 104 to send the system control interrupt to the system controller 102.
When the system controller 102 receives the system control interrupt corresponding to the embedded controller 106, the system controller 102 queries the embedded controller 106 about a status of the devices connected to the system management bus 110 to generate further instructions to the devices. In one embodiment, the system controller 102 executes an operating system code to check data stored in a register 120 of the embedded controller 106 (step 206). The system controller 102 then determines occurrence of an event about a power level of the battery 108 according to the data stored in the register 120 of the embedded controller 106 (step 208). The system controller 102 then executes a basic input/output system (BIOS) code to detect the power level supplied by the battery 108 (step 210). Finally, the system controller 102 executes an operating system code to update data about the power level of the battery 108 (step 212).
Although the computer system 100 timely updates data about a power level of the battery 108, the computer system 100 still has deficiencies. First, the computer system 100 has an embedded controller 106 for controlling the system management bus 110. Because the computer system 100 may be a handheld device with a small size, the embedded controller 106, which occupies a large area of a printed circuit board of the computer system 100, hinders size reduction of the computer system 100. In addition, a computer system 100 requiring the embedded controller 106 has a higher cost than one that does not require the embedded controller 106. A computer system without the aforementioned deficiencies is therefore required.